<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css">
<script src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js"></script>
<div id="formula"></div>
<script>
  katex.render("c = \\pm\\sqrt{a^2 + b^2}", document.getElementById("formula"));
</script>